//
//  SerOrderSubSectionHeader.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/27.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "SerOrderSubSectionHeader.h"

@implementation SerOrderSubSectionHeader

- (void)fillHeaderVithModel:(OrderListModel *)model {
    
    self.orderNumLab.text = [NSString stringWithFormat:@"订单号：%@",model.uodOrderId];
    self.storeNameLab.text = model.uodSellerName;
    
    switch (model.uodStatus) {
        case SerCellOrderType_payDJ:{
            
            if (model.uodOrderType == 4) {
                self.orderStatusLab.text = @"待付意向金";
            } else {
                self.orderStatusLab.text = @"待付定金";
            }
        } break;
        case SerCellOrderType_waitPay:{
            self.orderStatusLab.text = @"待付款";
        } break;
        case SerCellOrderType_payWK:{
            self.orderStatusLab.text = @"待付尾款";

        } break;
        case SerCellOrderType_recOrder:{
            self.orderStatusLab.text = @"待接单";

        } break;
        case SerCellOrderType_service:{
            self.orderStatusLab.text = @"待服务";

        } break;
        case SerCellOrderType_serviced:{
            self.orderStatusLab.text = @"已服务";

        } break;
        case SerCellOrderType_serviceSure:{
            self.orderStatusLab.text = @"待用户确认完成";

        } break;
        case SerCellOrderType_evaluate:{
            self.orderStatusLab.text = @"待评价";

        } break;
        case SerCellOrderType_finish:{
            self.orderStatusLab.text = @"已完成";

        } break;
        case SerCellOrderType_cancle:{
            self.orderStatusLab.text = @"用户已取消";

        } break;
        case SerCellOrderType_sysClose:{
            self.orderStatusLab.text = @"系统自动关闭";

        } break;
        default:
            break;
    }
}

- (void)fillHeaderWithModel:(RefundListModel *)model {
    self.orderNumLab.text = [NSString stringWithFormat:@"订单号：%@",model.orderNo];
    self.storeNameLab.text = model.sellerName;
    
    //状态（1：已申请，2：商家同意，3：商家拒绝，4：平台同意，5：平台拒绝，6：退款中，7：退款成功，8：退款失败）
    switch (model.refundStatus) {
        case RefundStatusType_applyed:{
            self.orderStatusLab.text = @"已申请";
        } break;
        case RefundStatusType_storeSure:{
            self.orderStatusLab.text = @"商家同意";
        } break;
        case RefundStatusType_storeRef:{
            self.orderStatusLab.text = @"商家拒绝";
        } break;
        case RefundStatusType_platformSure:{
            self.orderStatusLab.text = @"平台同意";
        } break;
        case RefundStatusType_platformRef:{
            self.orderStatusLab.text = @"平台拒绝";
        } break;
        case RefundStatusType_refundIng:{
            self.orderStatusLab.text = @"退款中";
        } break;
        case RefundStatusType_refunded:{
            self.orderStatusLab.text = @"退款成功";
        } break;
        case RefundStatusType_refundFail:{
            self.orderStatusLab.text = @"退款失败";
        } break;
            
        default:
            break;
    }
}

@end
